// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

using System.Data;

namespace SnapObjects.Data
{
    /// <summary>
    ///     Represents the options for the DataContext object.
    /// </summary>
    public interface IDataContextOptions
    {
        /// <summary>
        ///     Gets the database type.
        /// </summary>
        DatabaseType DatabaseType { get; }

        /// <summary>
        ///     Gets a string that contains the connection information for opening the database.
        /// </summary>
        string ConnectionString { get; }

        /// <summary>
        ///     Gets or sets the default isolation level of the transaction in the DataContext object.
        /// </summary>
        IsolationLevel IsolationLevel { get; set; }

        /// <summary>
        ///     Gets or sets the wait time before terminating the attempt to execute a command and generating an error.
        /// </summary>
        int CommandTimeout { get; set; }

        /// <summary>
        ///     Gets or sets a bool value, which indicates whether to execute SQL commands in bulk when saving changes.
        /// </summary>
        bool BatchExecuting { get; set; }

        /// <summary>
        ///     Specifies whether to enclose the names of tables, columns, indexes, and constraints in double quotes
        ///     when the SQL statement is generated.
        /// </summary>
        bool EnableDelimitIdentifier { get; set; }
    }

    /// <summary>
    ///     Represents the options for the DataContext object.
    /// </summary>
    /// <typeparam name="TAdoDbContext"></typeparam>
    public interface IDataContextOptions<TAdoDbContext> : IDataContextOptions
    {
    }
}
